﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<fmt:setBundle basename="ApplicationMessage" />
<fmt:setLocale value="zh_CN" />

<div class="modal-dialog x-modal-dialog" style="width:800px;">

  <div class="modal-content">

    <div class="modal-header x-breadcrumb clearfix">
      <h2><i class="glyphicon glyphicon-fire" title="新建团课"></i>&nbsp;&nbsp;<span>新建团课</span></h2>
      
      <button type="button" class="close" data-dismiss="modal">&times;</button>
    </div>
    <div class="form-horizontal" >
      <div class="modal-body">
        <form id="search-form" action="${ctx.host }/group-rounds/list-selection" method="GET">
          <div class="form-group x-form-group">
            <label class="col-xs-3 control-label">课程类别</label>
            <div class="pull-left col-xs-8">
              <select name="course" class="form-control" data-validate="required">
                <option></option>
                <c:forEach var="course" items="${persist.groupCourses}">
                  <c:if test="${course.numbers >= 8}">
                    <option value="${course.id}">${course.name}（${course.numbers}人）</option>
                  </c:if>
                </c:forEach>
              </select>
            </div>
          </div>
        </form>
      
        <form class="bind-form"  action="${ctx.host}/group-rounds" method="POST" data-validate="true">
          <input type="hidden" name="courseId">
          <input type="hidden" name="roundIds">
          <div class="modal-body bootstrap-table">
            <div class="form-group x-form-group">
              <label class="col-xs-2 control-label">团课编号</label>
              <div class="pull-left" style="width: 30%">
                <input type="text" name="courseCode" class="form-control" data-validate="required">
              </div>
              <label class="col-xs-2 control-label">操房</label>
              <div class="pull-left" style="width: 30%">
                <input type="text" name="gym" class="form-control">
              </div>
            </div>
            <div class="form-group x-form-group">
              <label class="col-xs-2 control-label">开课时间</label>
              <div class="pull-left" style="width: 30%">
                <input type="text" name="startDate" class="form-control">
              </div>
            </div>
            <div style="width: 95%; margin: 0px auto; margin-bottom: 15px;">
              <table id="executor-table" class="table table-bordered table-hover" data-select-item-name="courseRound" >
                <thead>
                  <tr>
                    <th class="text-center" data-checkbox="true"></th>
                    <th data-field="student" class="text-center">学员名称</th>
                    <th data-field="site" class="text-center">场地名称</th>
                  </tr>
                </thead>
              </table>
            </div>
          </div>
          <div class="modal-footer">
            <button type="submit" class="btn btn-success btn-shadow btn-shadow-success x-btn">确认新建</button>&nbsp;&nbsp;&nbsp;&nbsp;
            <button type="button" class="btn btn-default btn-shadow btn-shadow-default x-btn" data-dismiss="modal">取消</button>
          </div>
        </form>
      </div>
    </div>

  </div>

</div>

